<!--
 * @Author: your name
 * @Date: 2021-05-10 13:46:25
 * @LastEditTime: 2021-06-05 14:29:00
 * @LastEditors: g05047
 * @Description: In User Settings Edit
 * @FilePath: \dolphin-data-center-front-end\src\pages\components\batchProcessing\increasedWorkers\steps2.vue
-->
<template>
    <div style="padding-top: 250px; text-align: center">
        <p>数据正在导入，请勿关闭或刷新页面</p>
        <div class="progress" style="margin: 0">
            <a-progress :percent="progressPercentNum" />
            <p>{{ progressTxt }}</p>
        </div>
    </div>
</template>

<script>
export default {
    name: "steps2",
    data() {
        return {
            labelCol: { span: 7 },
            wrapperCol: { span: 14 },
            form: {
                name: "",
            },
            progressPercentNum: 10,
            progressTxt: "数据正在导入中...",
        };
    },
    created() {
        this.progressPercent();
    },
    methods: {
        handleChange() {},
        progressPercent() {
            let _this = this;
            const timer = setInterval(() => {
                _this.progressPercentNum = _this.progressPercentNum + 20;
                if (this.progressPercentNum == 110) {
                    clearInterval(timer);
                    _this.progressTxt = "导入成功";
                    _this.$emit("importSuccess",true);
                }
            }, 1000);
        },
    },
};
</script>

<style scoped>
.progress {
    max-width: 950px;
    margin: 50px auto;
}
</style>
